package org.geek.core.mybatis.domain;

import java.io.Serializable;

/**
 * 用户表
 */
public class User implements Serializable {

	private static final long serialVersionUID = 5612654595662221278L;

	private int userId;

	private String account;

	private String password;

	private String realName;

	private short sex;

	private String email;

	private String mobile;

	private String remark;
	
	private int organId;
	
	private transient String organName;//机构名,用于显示

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public short getSex() {
		return sex;
	}

	public void setSex(short sex) {
		this.sex = sex;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getOrganId() {
		return organId;
	}

	public void setOrganId(int organId) {
		this.organId = organId;
	}

	public String getOrganName() {
		return organName;
	}

	public void setOrganName(String organName) {
		this.organName = organName;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	@Override
	public int hashCode() {
		return this.account.hashCode();
	}
	
	/**
	 *只比较account
	 */
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof User){
			return this.account.equals(((User) obj).getAccount());
		}
		return false;
	}

}